home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-wos-src / pasm / version.c < prev   
C/C++ Source or Header  |  1999-01-01  |  4KB  |  90 lines

  1. /* $VER: pasm version.c V1.2b (16.01.99)
  2.  *
  3.  * This file is part of pasm, a portable PowerPC assembler.
  4.  * Copyright (c) 1997-98  Frank Wille
  5.  *
  6.  * pasm is freeware and part of the portable and retargetable ANSI C
  7.  * compiler vbcc, copyright (c) 1995-98 by Volker Barthelmann.
  8.  * pasm may be freely redistributed as long as no modifications are
  9.  * made and nothing is charged for it. Non-commercial usage is allowed
  10.  * without any restrictions.
  11.  * EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
  12.  * SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
  13.  *
  14.  *
  15.  * v1.2b  (16.01.99) phx
  16.  *        Changed copyright for 1999.
  17.  * v1.0   (24.05.98) phx
  18.  *        New version numbering using characters to indicate the patch level.
  19.  * v0.7   (02.01.98) phx
  20.  *        Option -O (output format) was renamed to -F. New option -O for
  21.  *        enabling optimizations. Changed "1997" to "1997-98".
  22.  *        Output format 3 is ADOS (like EHF, but doesn't use HUNK_PPC_CODE).
  23.  * v0.6   (30.10.97) phx
  24.  *        Description for option -R was changed from "don't predefine
  25.  *        standard symbols" into "don't predefine register symbols".
  26.  *        Options to disable warnings for optional, 64-bit and super-
  27.  *        visor instructions: -mo, -m64, -ms.
  28.  * v0.5   (12.10.97) phx
  29.  *        New option -D to define a symbol.
  30.  * v0.4   (02.07.97) phx
  31.  *        -V prints only version and build string and no instructions. New
  32.  *        function show_version().
  33.  *        Base address for absolute code may be set with -B option.
  34.  *        New option -I to specify some include paths.
  35.  *        Option -x automatically declares unknown symbols as
  36.  *        externally defined.
  37.  * v0.3   (26.03.97) phx
  38.  *        New option -O to select output file format.
  39.  * v0.2   (25.03.97) phx
  40.  *        Writes ELF object for 32-bit PowerPC big-endian. Either absolute
  41.  *        or ELF output format may be selected. ELF is default for all
  42.  *        currently supported platforms. PPCasm supports nine different
  43.  *        relocation types (there are much more...).
  44.  *        Compiles and works also under NetBSD/amiga (68k).
  45.  *        Changed function declaration to 'new style' in all sources
  46.  *        (to avoid problems with '...' for example).
  47.  * v0.1   (11.03.97) phx
  48.  *        First test version with all PowerPC instructions and most
  49.  *        important directives. Only raw, absolute output.
  50.  * v0.0   (14.02.97) phx
  51.  *        File created. Project started.
  52.  */
  53.  
  54.  
  55. #define VERSION_C
  56. #include "ppcasm.h"
  57.  
  58.  
  59. void show_version(void)
  60. {
  61.   printf(PNAME " V%d.%d%c (" MACHINE ")  (c)1997-99 by Frank Wille\n"
  62.          "build date: " __DATE__ ", " __TIME__ "\n\n"
  63.          ,VERSION,REVISION,PLEVEL?('a'+PLEVEL-1):' ');
  64. }
  65.  
  66.  
  67. void show_usage(void)
  68. {
  69.   show_version();
  70.  
  71.   printf("usage: " PNAME " [?][-V][-o <file>][-I <path>][-D <sym>[=<exp>]]"
  72.          "[-w][-x][-R][-X][-F <n>][-B <addr>][-m64|s|o][-O <level>] <file>\n"
  73.          "<file>           PowerPC source text to assemble\n"
  74.          "-V               print version identification and build string\n"
  75.          "-o <file>        output file name\n"
  76.          "-I <path>        add include path\n"
  77.          "-D <sym>[=<exp>] define a symbol\n"
  78.          "-w               suppress warnings\n"
  79.          "-x               undefined symbols are automatically external\n"
  80.          "-R               don't predefine register symbols\n"
  81.          "-X               no extended mnemonics\n"
  82.          "-F <n>           set output format (0=abs, 1=elf, 2=ehf, 3=ados)\n"
  83.          "-B <address>     base address for absolute output\n"
  84.          "-m64             enable 64-bit instructions\n"
  85.          "-ms              enable supervisor instructions\n"
  86.          "-mo              enable optional instructions\n"
  87.          "-O <level>       enable optimizations\n"
  88.          );
  89. }
  90.